import 'package:flutter_ncsjqz_getx/http/dio_service.dart';
import 'package:flutter_ncsjqz_getx/model/refund_details_entity.dart';
import 'package:get/get.dart';

enum AfterEnum {
  TJSQ, // 0提交申请
  SJCL, // 1商家处理
  TKCG // 2退款成功
}

class AfterInfoLogic extends GetxController {
  AfterEnum status = AfterEnum.TJSQ;
  RefundDetailsData refundDetailsData = RefundDetailsData();
  setAfterStatus(AfterEnum value) {
    status = value;
    update();
  }

  getDetails(orderId) async{
    RefundDetailsEntity baseEntity = await DioService<RefundDetailsEntity>().queryOrderRefundDetail(
        {'orderId': orderId}
    );
    if(baseEntity.code == 0){
      refundDetailsData = baseEntity.data!;
      update();
    }
  }
}
